import {get, outPost, post, put, remove} from "../http.js";
// 用户相关的接口
export function getAllRole(page,limit){
    return get(`/role/getAllRole/${page}/${limit}`)
}
export function addRole(form){
    return put("/role/addRole",form)
}
export function editRole(form){
    return post("/role/editRole",form)
}
export function removeRole(roleNo){
    return remove(`/role/removeRole/${roleNo}`)
}
export function batchRemoveRole(id){
    return remove("/role/batchRemoveRole/"+id)
}
export function searchRole(search){
    return post("/role/searchRole",search)
}
export function batchAddRole(roles){
    return post("/role/batchAddRole",roles)
}
export function batchOutRole(roles){
    return outPost("/role/batchOutRole",roles)
}
export function getRolePower(role){
    return get("/role/getRolePower/"+role)
}
export function addRolePower(role,power){
    return post("/role/addRolePower",{"role":role,"powerArray":power})
}
